import java.util.Scanner;

public class test1 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();//输入单号的数量
        String[] strs = new String[n];//快递单号
        for (int i = 0; i < n; i++) {
            strs[i] = in.next();
        }
        getResult(strs);
    }
    public static void getResult(String[] strings){
        //对快递进行判断
        int n = strings.length;
        for (int i = 0; i < n; i++) {
            char[] chars = strings[i].toCharArray();
            int flag = 0;//记录快递的种类
            //0-无效 1-顺丰 2-特快 3-国际 4-电商
            if(chars[0]=='S'&&chars[1]=='F'){
                //顺丰
                if(chars.length==12) {
                    int flag2=0;
                    for (int j = 2; j < chars.length; j++) {
                        if (!Character.isDigit(chars[j])) {
                            flag2=1;
                            break;
                        }
                    }
                    if(flag2==0){
                        flag=1;
                    }
                }
            }else if(chars[0]=='E'&&chars[1]=='X'
            && Character.isUpperCase(chars[2]) && Character.isUpperCase(chars[3])){
                //特快
                if(chars.length==12){
                    int flag2=0;
                    for (int j = 4; j < chars.length; j++) {
                        if(!Character.isDigit(chars[j])) {
                            flag2 = 1;
                            break;
                        }
                    }
                    if(flag2==0) flag = 2;
                }
            } else if (chars[0] == 'I' && chars[1] == 'N'
            && Character.isUpperCase(chars[2]) && Character.isUpperCase(chars[3]) && Character.isUpperCase(chars[4])) {
                //国际.最后两位之和要是偶数
                if(chars.length==11){
                    int flag2=0;
                    for (int j = 5; j < chars.length; j++) {
                        if(!Character.isDigit(chars[j])) {
                            flag2 = 1;
                            break;
                        }
                    }
                    if((chars[chars.length-1]+chars[chars.length-2])%2!=0){
                        flag2=1;
                    }
                    if(flag2==0) flag = 3;
                }
            } else if (chars[0]!='0') {
                if(chars.length==12){
                    int flag2=0;
                    for (int j = 2; j < chars.length; j++) {
                        if(!Character.isDigit(chars[j])) {
                            flag2 = 1;
                            break;
                        }
                    }
                    if(flag2==0) flag = 4;
                }
            }
            solveFlag(flag);
        }
    }
    public static void solveFlag(int flag){
        switch (flag){
            case 0 :
                System.out.println("Invalid");
                break;
            case 1 :
                System.out.println("Normal");
                break;
            case 2 :
                System.out.println("Express");
                break;
            case 3 :
                System.out.println("International");
                break;
            case 4 :
                System.out.println("E-commerce");
                break;
        }
    }
}
